<p>This rule raises an issue when code imports from a module and then immediately exports the same identifiers without using them elsewhere.</p>
<h2>Why is this an issue?</h2>
<p>When re-exporting from a module, using separate import and export statements creates unnecessary verbosity and intermediate variables.</p>
<p>The pattern of importing something just to export it again is common when creating barrel exports or module facades. However, JavaScript provides
the <code>export…​from</code> syntax specifically for this use case.</p>
<p>Using <code>import</code> followed by <code>export</code> for re-exports has several drawbacks:</p>
<ul>
  <li> It creates unnecessary intermediate variables that serve no purpose </li>
  <li> It makes the code more verbose and harder to read </li>
  <li> It requires two statements where one would suffice </li>
  <li> It can confuse readers about whether the imported values are used locally </li>
</ul>
<p>The <code>export…​from</code> syntax is more explicit about the intent to re-export and eliminates the intermediate step entirely.</p>
<h3>What is the potential impact?</h3>
<p>This issue affects code readability and maintainability. While it doesn’t cause runtime problems, it makes the codebase more verbose and
potentially confusing for developers who need to understand the module’s exports.</p>
<h3>How to fix?</h3>
<p>Replace the import and export statements with a single export…​from statement for default exports.</p>
<h4>Non-compliant code example</h4>
<pre data-diff-id="1" data-diff-type="noncompliant">
import defaultExport from './foo.js';
export default defaultExport; // Noncompliant
</pre>
<h4>Compliant code example</h4>
<pre data-diff-id="1" data-diff-type="compliant">
export {default} from './foo.js';
</pre>
<h3>Documentation</h3>
<ul>
  <li> <a href="https://github.com/sindresorhus/eslint-plugin-unicorn#readme">eslint-plugin-unicorn</a> - Rule <a
  href="https://github.com/sindresorhus/eslint-plugin-unicorn/blob/HEAD/docs/rules/prefer-export-from.md">prefer-export-from</a> </li>
  <li> MDN - export statement - <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export">Comprehensive
  documentation on JavaScript export statements including export…​from syntax</a> </li>
  <li> MDN - import statement - <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import">Documentation on
  JavaScript import statements and module imports</a> </li>
</ul>
